package com.yanh.merchant.service;

import com.yanh.common.domain.PageResult;
import com.yanh.common.exception.BusinessException;
import com.yanh.merchant.domain.Merchant;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yanh.merchant.dto.*;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yanh
 * @since 2024-06-01
 */
public interface IMerchantService extends IService<Merchant> {

    /**
     *  注册商户服务接口，接收账号、密码、手机号，为了可扩展性使用merchantDto接收数据
     * @param merchantDTO 商户注册信息
     * @return 注册成功的商户信息
     */
    int createMerchant(Merchant merchantDTO) throws BusinessException;

    Boolean existMerchant(String mobile) throws BusinessException;

    boolean applyMerchant(MerchantDetailDto merchant) throws BusinessException;

    StoreDTO createStore(StoreDTO storeDTO) throws BusinessException;

    StaffDTO createStaff(StaffDTO staffDTO) throws BusinessException;

    void bindStaffToStore(Long storeId, Long staffId) throws BusinessException;

    PageResult<StoreDTO> queryStoreByPage(StoreDTO storeDTO, Integer pageNo, Integer pageSize);

    String createStoreQRCodeUrl(QRCodeDto qrCodeDto) throws BusinessException;

    Boolean queryStoreInMerchant(Long storeId, Long merchantId);

    MerchantDTO queryMerchantById(Long id);
}
